package com.bball.court;

import android.test.InstrumentationTestCase;

public class FaCConfigurationTest extends InstrumentationTestCase {

    private FaCConfiguration instance;

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        instance = FaCConfiguration.getInstance(getInstrumentation().getTargetContext());
    }

    public void testClosestCourtUrl() {
        double latitude = 45.50867;
        double longitude = -73.55399;
        String courtUrl = instance.getPlayClosestCourtUrl(latitude, longitude, 10);
        assertEquals("http://find-court-web.herokuapp.com/api/courts?lat=45.50867&lon=-73.55399&radius=10", courtUrl);
    }
}
